package com.jy.rhin.model.header;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.model.CodeObject;
import lombok.Data;

/**
 * @Author 姚俊
 * @Date 2023/2/3 16:48
 * @Description 患者个人基本信息
 */
@Data
public class Patient {
    //身份证号标识 pdf文档标识错误 DE02_01_031_00
    @XPath(path = "/id/@extension"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_030_00, nullable = true))
    String id;
    //姓名
    @XPath(path = "/name/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_039_00, nullable = true))
    String name;
    //性别
    @XPath(path = "/administrativeGenderCode"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_040_00, nullable = true))
    CodeObject administrativeGender;
    //出生日期
    @XPath(path = "/birthTime/@value"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_005_01, nullable = true))
    String birthTime;
    //婚姻状况
    @XPath(path = "/maritalStatusCode"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_018_00, nullable = true))
    CodeObject maritalStatus;
    //民族
    @XPath(path = "/ethnicGroupCode"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_025_00, nullable = true))
    CodeObject ethnicGroup;
    //工作单位名称
    @XPath(path = "/employerOrganization/name/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE08_10_007_00, nullable = true))
    String employerOrganization;
    //工作单位电话
    @XPath(path = "/employerOrganization/telecom/value()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_010_00, nullable = true))
    String telecom;
    //工作单位名称
    @XPath(path = "/employerOrganization/addr")
    Addr employerOrganizationAddr;
    //常住类型
    @XPath(path = "/household/houseType/@value"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_003_00, nullable = true))
    String houseType;
    //文化程度代码
    @XPath(path = "/educationLevel/educationLevelCode"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_041_00, nullable = true))
    CodeObject educationLevel;
    //职业代码
    @XPath(path = "/occupation/occupationCode")
    CodeObject occupation;
    //监护人信息
    @XPath(path = "/guardian")
    Guardian guardian;
    //户籍信息
    @XPath(path = "/household/place/addr")
    Addr householdAddr;
    //出生地
    @XPath(path = "/birthplace/place/addr/text()")
    String birthplace;
}
